CC=gcc
CXX=g++
CFLAGS=
CXXFLAGS=-g -m32
INCLUDES=-I/usr/include
LDFLAGS_1sample=-m32 -L/usr/local/lib -lglut -lGL
LDFLAGS_2sample=-m32 -L/usr/local/lib -lglut -lGL -lGLU

ALL_SAMPLE=1sample 2sample

all : $(ALL_SAMPLE)

1sample : first.o
	$(CXX) $(CXXFLAGS) first.o $(LDFLAGS_1sample) -o 1sample

first.o : first.cpp
	$(CXX) $(CXXFLAGS) $(INCLUDES) -c first.cpp -o first.o

2sample : second.o
	$(CXX) $(CXXFLAGS) second.o $(LDFLAGS_2sample) -o 2sample

second.o : second.cpp
	$(CXX) $(CXXFLAGS) $(INCLUDES) -c second.cpp -o second.o

clean :
	@rm -f *.o $(ALL_SAMPLE)
	@echo all cleaned

.PHONY : clean all
